package com.situ.gym.redis;

import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;

public class JedisDemo {
    @Test
    public void test1() {
        Jedis jedis = new Jedis("localhost", 6379);
        jedis.set("name", "张三");
        jedis.close();
    }

    @Test
    public void test2() {
        Jedis jedis = new Jedis("localhost", 6379);
        String name = jedis.get("name");
        System.out.println(name);
        jedis.close();
    }

}
